{include file="public/hunanconstr_meta" /}
<link href="__PUBLIC_ADMIN__css/plugins/footable/footable.core.css" rel="stylesheet">
<style>
#huiedit{
    background-color: #1ab394;
    color: #FFFFFF;
}
#huidel{
    background-color: #ed5565;
    color: #FFFFFF;
}
#hui{
     width: 50px;
        height: 50px;
}
</style>
</head>

<body class="gray-bg">
   <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>行程列表</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="row m-b-sm m-t-sm">
                            <div class="col-md-1">
                                <button type="button" id="loading-example-btn" class="btn btn-white btn-sm refresh" ><i class="fa fa-refresh"></i> 刷新</button>
                            </div>
                        </div>

                        <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="50" data-filter=#filter>
                            <thead>
                                    <tr>
                                        <th width="100">序列</th>
                                        <th width="100">会议ID</th>
                                        <th width="200">姓名</th>
                                        <th width="200">电话</th>
                                        <th width="200">房号</th>
                                        <th width="200">酒店</th>
                                        <th data-hide="all">来程日期</th>
                                        <th data-hide="all">来程航班</th>
                                        <th data-hide="all">航段</th>
                                        <th data-hide="all">起飞时间-降落时间</th>
                                        <th data-hide="all">回程日期</th>
                                        <th data-hide="all">回程航班</th>
                                        <th data-hide="all">航段</th>
                                        <th data-hide="all">起飞时间-降落时间</th>
                                        <th width="200">创建时间</th>
                                        <th>接机安排</th>
                                        <td width="200">操作</td>
                                    </tr>
                                </thead>
                                <tbody>
                                    {foreach name="res" id="vo" key="key"}
                                    <tr class="gradeX">
                                        <td>{$key+1}</td>
                                        <td>{$vo.meeting_id}</td>
                                        <td>{$vo.name}</td>
                                        <td>{$vo.mobile}</td>
                                        <td>{$vo.number}</td>
                                        <td>{$vo.hotel_name}</td>
                                        <td>{if condition="$vo.go_start_date neq null"}{$vo.go_start_date|date="Y/m/d",###}{/if}</td>
                                        <td>{$vo.go_flight_number}</td>
                                        <td>{$vo.go_start_addr} - {$vo.go_end_addr}</td>
                                        <td>{$vo.go_start_time} - {$vo.go_end_time}</td>
                                        <td>{if condition="$vo.back_end_date neq null"}{$vo.back_end_date|date="Y/m/d",###}{/if}</td>
                                        <td>{$vo.back_flight_number}</td>
                                        <td>{$vo.back_start_addr} - {$vo.back_end_addr}</td>
                                        <td>{$vo.back_start_time} - {$vo.back_end_time}</td>
                                        <td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
                                        <td>
                                        {if condition="($vo.go_start_date neq null) && ($vo.go_end_time neq null) && ($vo.go_status eq 0)"}<a href="{:url('admin/Meeting/travelCar',['id'=>$vo.id,'purpose'=>0])}" id="huiedit" class="btn btn-white btn-sm edit">安排接机 </a>
                                        {elseif condition="$vo.go_status eq 1"}{$vo.driver_name} {$vo.car_number}{else/}条件不满足{/if}
                                        </td>
                                        <td>
                                            {if condition="$vo.car_id neq null"}
                                            <a href="{:url('admin/Meeting/carArrangeEdit',['id'=>$vo.car_id])}" id="huiedit" class="btn btn-white btn-sm">编辑 </a>
                                            {/if}
                                            <!-- <a href="{:url('admin/Meeting/travelListDel',['id'=>$vo.id])}" id="huiedit" class="btn btn-white btn-sm">删除 </a> -->
                                        </td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                                <tfoot hidden="hidden">
                                    <tr>
                                        <td colspan="5">
                                            <ul class="pagination pull-right"></ul>
                                        </td>
                                    </tr>
                                </tfoot>   
                        </table>
                        <div class="item-page" style="padding-left:36%;">
                        
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
        
    {include file="public/_footer" /}
    <script src="__PUBLIC_ADMIN__js/plugins/footable/footable.all.min.js"></script>
    
    <!-- 自定义js -->
    <script src="__PUBLIC_ADMIN__js/content.js?v=1.0.0"></script>
    <script>
        $(document).ready(function() {
            $('.footable').footable();
            $('.footable2').footable();
            
            $('.refresh').click(function(){
                window.location.reload();   // 刷新页面
            })
            
            //iframe窗
            $('.edit').click(function(){
                var url = $(this).attr('data-url');
                var index = layer.open({
                    type : 2,
                    fixed: true,
                    scrollbar: false,
                    title : '编辑',
                    shadeClose : false,
                    maxmin : true, //开启最大化最小化按钮
                    area : ['893px', '600px'],
                    //offset: '100px',
                    content : url
                });
                layer.full(index);
            })
        });
    </script>
</body>
</html>
